//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#include <libpub.h>

extern "C" int _UsbDownloadImageEx(unsigned long);

int Do_UsbDownLoad(char *param)
{
    TOUT(1, 1, printf("usb download [%s]\n", param));
    if (*param) {
        unsigned long uImageBase;
        param = Bo_ParseInteger(param, &uImageBase);
        TOUT(1, 1, printf("uImageBase = 0x%08x\n", uImageBase));
        _UsbDownloadImageEx(uImageBase);
    }
    return 0;
}

DECL_MAINCMD(Do_UsbDownLoad, \
    "usb {ImageBase}   - usb download",  \
    "download os image through usb2serial, " \
    "default image base config by macro IMAGEBASE\n");
